import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Box-OverflowBox-溢出容器',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Box-OverflowBox-溢出容器'),
        ),
          body: Container(
            color: Colors.green,
            width: 200,
            height: 200,
            padding: const EdgeInsets.all(6.0),
            //益处容器
            child: OverflowBox(
              alignment: Alignment.topLeft,
              //溢出最值
              maxWidth: 300,
              maxHeight: 500,
              child: Container(
                color: Colors.blue,
                width: 400,
                height: 400,
              ),
            ),
          )
      ),
    );
  }
}

